<?php
/**
 * @package LaravelBoot
 *
 * @internal
 *
 * @author mawenpei
 * @date 2019/3/15 17:53
 * @version
 */
namespace App\Console\Commands;

use App\AliyunPush;
use Carbon\Carbon;
use Illuminate\Console\Command;

class PushCommand extends Command
{
    protected $signature = 'push';

    protected $description = 'Push Message';

    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        //0776611840c8457f9d52ec5b33f3081e
        //15da31576d46479184c837297c3f9e94
        echo AliyunPush::pushAndroid('0776611840c8457f9d52ec5b33f3081e','信息提示','您有一个优惠券将于3月31日过期,请赶快充值使用吧');
        echo PHP_EOL;
        //echo AliyunPush::pushAndroid('0776611840c8457f9d52ec5b33f3081e','Hello','Hello');
        echo PHP_EOL;
        //token:4884414eed189f4181164dc06066b275f55c4e6fc8edb3b523ab55e80544d1d2
        echo AliyunPush::pushApple('bf468c49ebf1428eb5c28d8f3c410451','信息提示','您有一个优惠券将于3月31日过期,请赶快充值使用吧');
        echo PHP_EOL;
    }

}